home *** CD-ROM | disk | FTP | other *** search
- AUTOMATON*
-
- Brian's_Brain
-
- The owner of the escaped brain in question, is one Brian Silverman. His
- brain is a deceptively simple three state automaton, run in the Moore
- neighbourhood. The three states are referred to as 'ready', 'firing' &
- 'refractory'. A cell which has just fired will become refractory on the
- next generation & then revert to ready. Ready cells will subsequently fire
- if they have precisely two firing neigbours. This results in pulses of
- firing cells drifting across the brain, colliding & sending off signals in
- other directions. An initial soup quickly settles down to a typical level
- of activity. Try a window of 200x100.
-
- INITIALISATION*
-
- 10DEF PROCdo
- 20*SetEval wrap on
- 30*SetEval ready 127
- 40*SetEval firing 96
- 50*SetEval refractory 22
- 60ENDPROC
-
- SCREEN*
-
- 10DEF PROCdo
- 20DIM buf% 256:SYS "OS_ReadVarVal","ready",buf%,256:rea=!buf%
- 30SYS "OS_ReadVarVal","firing",buf%,256:fir=!buf%
- 40SYS "OS_ReadVarVal","refractory",buf%,256:ref=!buf%
- 50PROCsoup(ref,1,1)
- 60PROCsoup(rea,1,.5):PROCsoup(fir,1,.33)
- 70ENDPROC
-
- CODE*
-
- ( CELL <ready> = IF (READ_NEIG <firing> SCOUNT_NEIG
- 2 = IF (<firing> ==) <ready> ==)
- CELL <firing> = IF (<refractory> ==)
- <ready> == )
-
- END*